<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="UsuarioClienteCreateDlg" widgetVar="UsuarioClienteCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateUsuarioTitle}">
            <h:form id="UsuarioCreateForm">
                <input type="password" name="password_fake" id="password_fake" value="" style="display: none;" />
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{tbInstController.selected != null}">
                        <p:outputLabel value="Email" for="login" />
                        <p:inputText id="login" value="#{tbInstController.selected.desEmail}" title="#{bundle.CreateUsuarioTitle_login}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_login}"/>
                        <p:outputLabel value="#{bundle.CreateUsuarioLabel_senha}" for="senha" />
                        <p:password id="senha" value="#{tbInstController.selected.desSenha}" title="#{bundle.CreateUsuarioTitle_senha}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_senha}"/>
                        <p:outputLabel value="Confirmar senha" for="confirmar_senha" />
                        <p:password id="confirmar_senha" value="#{tbInstController.selected.desSenha}" title="#{bundle.CreateUsuarioTitle_senha}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_senha}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{tbInstController.create}" value="#{bundle.Save}" update="display,:growl" oncomplete="handleSubmit(args,'UsuarioClienteCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" immediate="true" onclick="UsuarioClienteCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
